package cn.abcsys.cloud.devops.runtime.core;

import java.util.Map;

import cn.abcsys.cloud.devops.runtime.bean.Result;
/**
 * 主机核心操作接口
 * @author mayunhao
 *
 */
public interface HostCore {
	/**
	 * 根据主机名称、监听端口，获取主机的详细信息
	 * @param hostName
	 * @param port
	 * @return
	 */
//	public Result getHostSystemInfo(String hostName);
	/**
	 * 添加主机时根据主机类型，启动kubenete程序
	 * @param host
	 * @param type MASTER/NODE
	 * @return
	 */
	public Result isKube(String hostIp);
	/**
	 * 添加主机时根据主机类型，启动kubenete程序
	 * @param host
	 * @param type MASTER/NODE
	 * @return
	 */
	public Result startKube(String hostIp,String type,Map<String, String> params);
	/**
	 * 停止k8s
	 * @param host
	 * @param type MASTER/NODE
	 * @return
	 */
	public Result stopKube(String hostIp,String type);
	/**
	 * 添加主机域名
	 * @param host
	 * @param type MASTER/NODE
	 * @return
	 */
	public Result addDns(String nodeHostName,String masterIp,String masterDnsName);
	/**
	 * 移除主机域名
	 * @param host
	 * @param type MASTER/NODE
	 * @return
	 */
	public Result removeDns(String nodeHostName,String masterDnsName);
	
	public Result isDistribution(String registryHostIp);
	public Result stopDistribution(String registryHostIp);
	public Result startDistribution(String registryHostIp,Map<String, String> params);
	public Result isRunning(String registryHostIp);
	Result nodeRunning(String hostIp);
	Result masterRunning(String hostIp);
	
}
